#!/user/bin/env node

const Koa = require('koa');
const app = new Koa(),
      log = console.log,
      bodyparser = require('koa-bodyparser'),
      loadRouters = require('require-directory');

app.use(bodyparser({enableTypes:['json','form','text']}));

loadRouters(module,'./routes',{visit:(r)=>{
  app.use(r.routes());
}});

app.listen(8080);
